@contentLineHeight: 1.5;
@toolbarHeight: 37px;
@editorHeight: 540px;
@borderColor: #ccc;
@lightColor: #0081FF;

.editor-title {
  font-size: 16px;
}

.md-editor textarea,
.md-preview,
.tag-input input {
  line-height: @contentLineHeight;
}

/* Style for Editor */
.md-panel {
  display: block;
  position: relative;
  margin-top: 40px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
  overflow: hidden;

  &.fullscreen {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    z-index: 500;

    .md-editor {
      height: 100%;
    }
  }

  &.disabled {
    textarea { cursor: default; }
    .tb-btn a {
      cursor: default;

      &:hover {
        color: #aaa;
        background-color: #fff;
      }
      &:active {
        box-shadow: none;
      }
    }
  }
}
.md-menubar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: @toolbarHeight;
  border-bottom: 1px solid #ccc;
  box-shadow: 0 0 1px #ccc;
  z-index: 10;
  background-color: #fff;
}
.md-toolbar, .md-modebar {
  margin: 0;
}

.md-toolbar {
  padding: 0 5px;
  background-color: #fff;
}
.md-modebar .tb-btn { float: right; }
.tb-btn, .tb-func-btn {
  float: left;
  font-size: 14px;
  list-style: none;
  margin: 0 2px;

  &.spliter {
    border-left: 1px solid @borderColor;
    margin: 6px 2px;
    height: 24px;
  }

  a {
    display: inline-block;
    position: relative;
    width: 36px;
    height: 36px;
    text-align: center;
    padding: 9px 0;
    cursor: pointer;
    color: #aaa;

    &:hover, &.active {
      color: @lightColor;
      background-color: #eee;
    }
    &:active {
      box-shadow: inset 0 1px 5px rgba(0,0,0,0.2);
    }
  }

  input[type="file"] {
    display: none;
  }

  .badge {
    position: absolute;
    padding: 1px 5px;
    right: 0;
    bottom: 0;
  }
}

.md-editor {
  width: 50%;
  height: auto;
  transition: width .3s;
  background-color: #fff;

  &.expand { width: 100%; }

  textarea {
    display: block;
    border-style: none;
    resize: none;
    outline: 0;
    height: 100%;
    min-height: @editorHeight;
    width: 100%;
    // margin-top: ;
    padding: (@toolbarHeight + 10px) 15px 0 15px;
  }
}
.md-preview {
  position: absolute;
  width: 50%;
  height: 100%;
  left: 50%;
  top: 0;
  background-color: #f6f6f6;
  padding: 45px 20px 20px 20px;
  border-left: 1px solid @borderColor;
  overflow: auto;
  transition: left .3s, width .3s;

  &.expand {
    left: 0;
    width: 100%;
    border-left-style: none;
  }
  &.shrink {
    left: 100%;
    width: 0;
  }
}
.md-spliter {
  position: absolute;
  top: 0;
  left: 50%;
  height: @toolbarHeight;
  border-left: 1px solid #ccc;
  z-index: 105;
}
.md-btngroup {
  margin-top: 20px;

  .help-text {
    margin-left: 15px;
  }
}
